<!DOCTYPE html><html><head>
      <title>manual</title>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      
      <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.0-rc.1/dist/katex.min.css">
      
      
      
      
      
      
      
      
      

      <style> 
      /**
 * prism.js Github theme based on GitHub's theme.
 * @author Sam Clarke
 */
code[class*="language-"],
pre[class*="language-"] {
  color: #333;
  background: none;
  font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  line-height: 1.4;

  -moz-tab-size: 8;
  -o-tab-size: 8;
  tab-size: 8;

  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

/* Code blocks */
pre[class*="language-"] {
  padding: .8em;
  overflow: auto;
  /* border: 1px solid #ddd; */
  border-radius: 3px;
  /* background: #fff; */
  background: #f5f5f5;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
  padding: .1em;
  border-radius: .3em;
  white-space: normal;
  background: #f5f5f5;
}

.token.comment,
.token.blockquote {
  color: #969896;
}

.token.cdata {
  color: #183691;
}

.token.doctype,
.token.punctuation,
.token.variable,
.token.macro.property {
  color: #333;
}

.token.operator,
.token.important,
.token.keyword,
.token.rule,
.token.builtin {
  color: #a71d5d;
}

.token.string,
.token.url,
.token.regex,
.token.attr-value {
  color: #183691;
}

.token.property,
.token.number,
.token.boolean,
.token.entity,
.token.atrule,
.token.constant,
.token.symbol,
.token.command,
.token.code {
  color: #0086b3;
}

.token.tag,
.token.selector,
.token.prolog {
  color: #63a35c;
}

.token.function,
.token.namespace,
.token.pseudo-element,
.token.class,
.token.class-name,
.token.pseudo-class,
.token.id,
.token.url-reference .token.variable,
.token.attr-name {
  color: #795da3;
}

.token.entity {
  cursor: help;
}

.token.title,
.token.title .token.punctuation {
  font-weight: bold;
  color: #1d3e81;
}

.token.list {
  color: #ed6a43;
}

.token.inserted {
  background-color: #eaffea;
  color: #55a532;
}

.token.deleted {
  background-color: #ffecec;
  color: #bd2c00;
}

.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}


/* JSON */
.language-json .token.property {
  color: #183691;
}

.language-markup .token.tag .token.punctuation {
  color: #333;
}

/* CSS */
code.language-css,
.language-css .token.function {
  color: #0086b3;
}

/* YAML */
.language-yaml .token.atrule {
  color: #63a35c;
}

code.language-yaml {
  color: #183691;
}

/* Ruby */
.language-ruby .token.function {
  color: #333;
}

/* Markdown */
.language-markdown .token.url {
  color: #795da3;
}

/* Makefile */
.language-makefile .token.symbol {
  color: #795da3;
}

.language-makefile .token.variable {
  color: #183691;
}

.language-makefile .token.builtin {
  color: #0086b3;
}

/* Bash */
.language-bash .token.keyword {
  color: #0086b3;
}html body{font-family:"Helvetica Neue",Helvetica,"Segoe UI",Arial,freesans,sans-serif;font-size:16px;line-height:1.6;color:#333;background-color:#fff;overflow:initial;box-sizing:border-box;word-wrap:break-word}html body>:first-child{margin-top:0}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{line-height:1.2;margin-top:1em;margin-bottom:16px;color:#000}html body h1{font-size:2.25em;font-weight:300;padding-bottom:.3em}html body h2{font-size:1.75em;font-weight:400;padding-bottom:.3em}html body h3{font-size:1.5em;font-weight:500}html body h4{font-size:1.25em;font-weight:600}html body h5{font-size:1.1em;font-weight:600}html body h6{font-size:1em;font-weight:600}html body h1,html body h2,html body h3,html body h4,html body h5{font-weight:600}html body h5{font-size:1em}html body h6{color:#5c5c5c}html body strong{color:#000}html body del{color:#5c5c5c}html body a:not([href]){color:inherit;text-decoration:none}html body a{color:#08c;text-decoration:none}html body a:hover{color:#00a3f5;text-decoration:none}html body img{max-width:100%}html body>p{margin-top:0;margin-bottom:16px;word-wrap:break-word}html body>ul,html body>ol{margin-bottom:16px}html body ul,html body ol{padding-left:2em}html body ul.no-list,html body ol.no-list{padding:0;list-style-type:none}html body ul ul,html body ul ol,html body ol ol,html body ol ul{margin-top:0;margin-bottom:0}html body li{margin-bottom:0}html body li.task-list-item{list-style:none}html body li>p{margin-top:0;margin-bottom:0}html body .task-list-item-checkbox{margin:0 .2em .25em -1.8em;vertical-align:middle}html body .task-list-item-checkbox:hover{cursor:pointer}html body blockquote{margin:16px 0;font-size:inherit;padding:0 15px;color:#5c5c5c;border-left:4px solid #d6d6d6}html body blockquote>:first-child{margin-top:0}html body blockquote>:last-child{margin-bottom:0}html body hr{height:4px;margin:32px 0;background-color:#d6d6d6;border:0 none}html body table{margin:10px 0 15px 0;border-collapse:collapse;border-spacing:0;display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}html body table th{font-weight:bold;color:#000}html body table td,html body table th{border:1px solid #d6d6d6;padding:6px 13px}html body dl{padding:0}html body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:bold}html body dl dd{padding:0 16px;margin-bottom:16px}html body code{font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:.85em !important;color:#000;background-color:#f0f0f0;border-radius:3px;padding:.2em 0}html body code::before,html body code::after{letter-spacing:-0.2em;content:"\00a0"}html body pre>code{padding:0;margin:0;font-size:.85em !important;word-break:normal;white-space:pre;background:transparent;border:0}html body .highlight{margin-bottom:16px}html body .highlight pre,html body pre{padding:1em;overflow:auto;font-size:.85em !important;line-height:1.45;border:#d6d6d6;border-radius:3px}html body .highlight pre{margin-bottom:0;word-break:normal}html body pre code,html body pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}html body pre code:before,html body pre tt:before,html body pre code:after,html body pre tt:after{content:normal}html body p,html body blockquote,html body ul,html body ol,html body dl,html body pre{margin-top:0;margin-bottom:16px}html body kbd{color:#000;border:1px solid #d6d6d6;border-bottom:2px solid #c7c7c7;padding:2px 4px;background-color:#f0f0f0;border-radius:3px}@media print{html body{background-color:#fff}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{color:#000;page-break-after:avoid}html body blockquote{color:#5c5c5c}html body pre{page-break-inside:avoid}html body table{display:table}html body img{display:block;max-width:100%;max-height:100%}html body pre,html body code{word-wrap:break-word;white-space:pre}}.markdown-preview{width:100%;height:100%;box-sizing:border-box}.markdown-preview .pagebreak,.markdown-preview .newpage{page-break-before:always}.markdown-preview pre.line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}.markdown-preview pre.line-numbers>code{position:relative}.markdown-preview pre.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:1em;font-size:100%;left:0;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.markdown-preview pre.line-numbers .line-numbers-rows>span{pointer-events:none;display:block;counter-increment:linenumber}.markdown-preview pre.line-numbers .line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}.markdown-preview .mathjax-exps .MathJax_Display{text-align:center !important}.markdown-preview:not([for="preview"]) .code-chunk .btn-group{display:none}.markdown-preview:not([for="preview"]) .code-chunk .status{display:none}.markdown-preview:not([for="preview"]) .code-chunk .output-div{margin-bottom:16px}.scrollbar-style::-webkit-scrollbar{width:8px}.scrollbar-style::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}.scrollbar-style::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,0.66);border:4px solid rgba(150,150,150,0.66);background-clip:content-box}html body[for="html-export"]:not([data-presentation-mode]){position:relative;width:100%;height:100%;top:0;left:0;margin:0;padding:0;overflow:auto}html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{position:relative;top:0}@media screen and (min-width:914px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{padding:2em calc(50% - 457px)}}@media screen and (max-width:914px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{font-size:14px !important;padding:1em}}@media print{html body[for="html-export"]:not([data-presentation-mode]) #sidebar-toc-btn{display:none}}html body[for="html-export"]:not([data-presentation-mode]) #sidebar-toc-btn{position:fixed;bottom:8px;left:8px;font-size:28px;cursor:pointer;color:inherit;z-index:99;width:32px;text-align:center;opacity:.4}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] #sidebar-toc-btn{opacity:1}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc{position:fixed;top:0;left:0;width:300px;height:100%;padding:32px 0 48px 0;font-size:14px;box-shadow:0 0 4px rgba(150,150,150,0.33);box-sizing:border-box;overflow:auto;background-color:inherit}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar{width:8px}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,0.66);border:4px solid rgba(150,150,150,0.66);background-clip:content-box}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc a{text-decoration:none}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc ul{padding:0 1.6em;margin-top:.8em}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc li{margin-bottom:.8em}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc ul{list-style-type:none}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{left:300px;width:calc(100% -  300px);padding:2em calc(50% - 457px -  150px);margin:0;box-sizing:border-box}@media screen and (max-width:1274px){html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{width:100%}}html body[for="html-export"]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .markdown-preview{left:50%;transform:translateX(-50%)}html body[for="html-export"]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .md-sidebar-toc{display:none}
/* Please visit the URL below for more information: */
/*   https://shd101wyy.github.io/markdown-preview-enhanced/#/customize-css */
 
      </style>
    </head>
    <body for="html-export">
      <div class="mume markdown-preview   ">
      <div class="code-chunk" data-id="code-chunk-id-0" data-cmd="toc"><div class="input-div"><div class="btn-group"><div class="run-btn btn"><span>&#x25B6;&#xFE0E;</span></div><div class="run-all-btn btn">all</div></div><div class="status">running...</div></div><div class="output-div"></div></div><ul>
<li><a href="#1-%E9%A1%B9%E7%9B%AE%E6%8F%8F%E8%BF%B0">1. &#x9879;&#x76EE;&#x63CF;&#x8FF0;</a></li>
<li><a href="#2-%E8%BD%AF%E4%BB%B6%E4%BE%9D%E8%B5%96">2. &#x8F6F;&#x4EF6;&#x4F9D;&#x8D56;</a></li>
<li><a href="#3-%E6%95%88%E6%9E%9C%E5%B1%95%E7%A4%BA">3. &#x6548;&#x679C;&#x5C55;&#x793A;</a></li>
<li><a href="#4-%E8%BD%AF%E4%BB%B6%E7%89%B9%E8%89%B2">4. &#x8F6F;&#x4EF6;&#x7279;&#x8272;</a></li>
<li><a href="#5-%E6%9E%B6%E6%9E%84%E8%AF%B4%E6%98%8E">5. &#x67B6;&#x6784;&#x8BF4;&#x660E;</a></li>
<li><a href="#6-%E9%99%90%E5%88%B6%E8%AF%B4%E6%98%8E">6. &#x9650;&#x5236;&#x8BF4;&#x660E;</a>
<ul>
<li><a href="#61-vnc%E7%8E%AF%E5%A2%83">6.1. VNC&#x73AF;&#x5883;</a></li>
</ul>
</li>
<li><a href="#7-%E7%9A%AE%E8%82%A4%E9%85%8D%E7%BD%AE">7. &#x76AE;&#x80A4;&#x914D;&#x7F6E;</a>
<ul>
<li><a href="#71-%E7%9A%AE%E8%82%A4%E7%9A%84%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6">7.1. &#x76AE;&#x80A4;&#x7684;&#x914D;&#x7F6E;&#x6587;&#x4EF6;</a></li>
<li><a href="#72-%E8%BF%9B%E7%A8%8B%E9%97%B4%E5%8A%9F%E8%83%BD%E8%B0%83%E7%94%A8">7.2. &#x8FDB;&#x7A0B;&#x95F4;&#x529F;&#x80FD;&#x8C03;&#x7528;</a></li>
<li><a href="#73-%E5%B8%83%E5%B1%80%E6%96%87%E4%BB%B6%E7%9A%84%E9%85%8D%E7%BD%AE">7.3. &#x5E03;&#x5C40;&#x6587;&#x4EF6;&#x7684;&#x914D;&#x7F6E;</a></li>
<li><a href="#74-%E5%B8%83%E5%B1%80%E6%96%87%E4%BB%B6%E7%9A%84%E5%8F%AF%E7%94%A8%E6%A0%87%E7%AD%BE">7.4. &#x5E03;&#x5C40;&#x6587;&#x4EF6;&#x7684;&#x53EF;&#x7528;&#x6807;&#x7B7E;</a>
<ul>
<li><a href="#741-keyboard">7.4.1. &lt;keyboard&gt;</a></li>
<li><a href="#742-page">7.4.2. &lt;page&gt;</a></li>
<li><a href="#743-btn">7.4.3. &lt;btn&gt;</a></li>
<li><a href="#744-key_xxx">7.4.4. &lt;key_xxx&gt;</a></li>
<li><a href="#745-plc">7.4.5. &lt;plc&gt;</a></li>
<li><a href="#746-shell">7.4.6. &lt;shell&gt;</a></li>
</ul>
</li>
<li><a href="#75-qss%E6%A0%B7%E5%BC%8F%E8%A1%A8">7.5. QSS&#x6837;&#x5F0F;&#x8868;</a>
<ul>
<li><a href="#751-%E7%AA%97%E5%8F%A3%E5%B1%9E%E6%80%A7%E7%9A%84%E9%85%8D%E7%BD%AE">7.5.1. &#x7A97;&#x53E3;&#x5C5E;&#x6027;&#x7684;&#x914D;&#x7F6E;</a></li>
<li><a href="#752-%E6%8C%89%E9%92%AE%E7%9A%84%E9%9D%99%E6%80%81%E6%A0%B7%E5%BC%8F">7.5.2. &#x6309;&#x94AE;&#x7684;&#x9759;&#x6001;&#x6837;&#x5F0F;</a></li>
<li><a href="#753-%E6%8C%89%E9%92%AE%E5%9C%A8%E6%8C%89%E4%B8%8B%E7%8A%B6%E6%80%81%E7%9A%84%E6%98%BE%E7%A4%BA%E6%A0%B7%E5%BC%8F">7.5.3. &#x6309;&#x94AE;&#x5728;&#x6309;&#x4E0B;&#x72B6;&#x6001;&#x7684;&#x663E;&#x793A;&#x6837;&#x5F0F;</a></li>
<li><a href="#754-%E6%8C%89%E9%92%AE%E5%9C%A8%E9%BC%A0%E6%A0%87%E6%82%AC%E5%81%9C%E6%97%B6%E7%9A%84%E6%98%BE%E7%A4%BA%E6%A0%B7%E5%BC%8F">7.5.4. &#x6309;&#x94AE;&#x5728;&#x9F20;&#x6807;&#x60AC;&#x505C;&#x65F6;&#x7684;&#x663E;&#x793A;&#x6837;&#x5F0F;</a></li>
<li><a href="#755-%E6%8C%89%E9%92%AE%E9%BB%8F%E6%BB%9E%E7%8A%B6%E6%80%81%E7%9A%84%E6%98%BE%E7%A4%BA%E6%A0%B7%E5%BC%8F">7.5.5. &#x6309;&#x94AE;&#x9ECF;&#x6EDE;&#x72B6;&#x6001;&#x7684;&#x663E;&#x793A;&#x6837;&#x5F0F;</a></li>
<li><a href="#756-%E6%8C%89%E9%92%AE%E8%BD%BB%E9%BB%8F%E6%BB%9E%E7%8A%B6%E6%80%81%E7%9A%84%E6%98%BE%E7%A4%BA%E6%A0%B7%E5%BC%8F">7.5.6. &#x6309;&#x94AE;&#x8F7B;&#x9ECF;&#x6EDE;&#x72B6;&#x6001;&#x7684;&#x663E;&#x793A;&#x6837;&#x5F0F;</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#8-%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B">8. &#x4F7F;&#x7528;&#x793A;&#x4F8B;</a>
<ul>
<li><a href="#81-%E5%88%9B%E5%BB%BA%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84">8.1. &#x521B;&#x5EFA;&#x76EE;&#x5F55;&#x7ED3;&#x6784;</a></li>
<li><a href="#82-%E8%B5%84%E6%BA%90%E6%96%87%E4%BB%B6">8.2. &#x8D44;&#x6E90;&#x6587;&#x4EF6;</a>
<ul>
<li><a href="#821-%E4%BB%80%E4%B9%88%E6%98%AFsvg">8.2.1. &#x4EC0;&#x4E48;&#x662F;svg</a></li>
<li><a href="#822-%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BAsvg">8.2.2. &#x5982;&#x4F55;&#x521B;&#x5EFA;svg</a></li>
<li><a href="#823-svg%E6%95%88%E6%9E%9C%E5%B1%95%E7%A4%BA%E9%80%9A%E8%BF%87%E5%9B%BE%E7%89%87%E6%A0%BC%E5%BC%8F%E6%89%93%E5%BC%80">8.2.3. svg&#x6548;&#x679C;&#x5C55;&#x793A;&#xFF08;&#x901A;&#x8FC7;&#x56FE;&#x7247;&#x683C;&#x5F0F;&#x6253;&#x5F00;&#xFF09;</a></li>
</ul>
</li>
<li><a href="#83-%E5%88%9B%E5%BB%BA%E5%90%AF%E5%8A%A8%E8%84%9A%E6%9C%AC">8.3. &#x521B;&#x5EFA;&#x542F;&#x52A8;&#x811A;&#x672C;</a></li>
<li><a href="#84-%E5%88%9B%E5%BB%BAxml%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6">8.4. &#x521B;&#x5EFA;xml&#x914D;&#x7F6E;&#x6587;&#x4EF6;</a></li>
<li><a href="#85-%E8%B0%83%E6%95%B4qss%E6%A0%B7%E5%BC%8F%E8%A1%A8%E6%96%87%E4%BB%B6">8.5. &#x8C03;&#x6574;QSS&#x6837;&#x5F0F;&#x8868;&#x6587;&#x4EF6;</a></li>
</ul>
</li>
</ul>
<h1 class="mume-header" id="1-%E9%A1%B9%E7%9B%AE%E6%8F%8F%E8%BF%B0">1. &#x9879;&#x76EE;&#x63CF;&#x8FF0;</h1>

<p>&#x672C;&#x8F6F;&#x4EF6;&#x7528;&#x4E8E;&#x63D0;&#x4F9B;&#x865A;&#x62DF;&#x952E;&#x76D8;/&#x9762;&#x677F;&#xFF0C;&#x7528;&#x4E8E;IO&#x7684;&#x8F93;&#x51FA;&#x8F93;&#x51FA;&#x3002;</p>
<h1 class="mume-header" id="2-%E8%BD%AF%E4%BB%B6%E4%BE%9D%E8%B5%96">2. &#x8F6F;&#x4EF6;&#x4F9D;&#x8D56;</h1>

<ul>
<li>virtkey</li>
<li>xml2dict</li>
<li>PyQt5</li>
</ul>
<h1 class="mume-header" id="3-%E6%95%88%E6%9E%9C%E5%B1%95%E7%A4%BA">3. &#x6548;&#x679C;&#x5C55;&#x793A;</h1>

<p><img src="res/demo.png" alt=""></p>
<h1 class="mume-header" id="4-%E8%BD%AF%E4%BB%B6%E7%89%B9%E8%89%B2">4. &#x8F6F;&#x4EF6;&#x7279;&#x8272;</h1>

<ul>
<li>&#x9AD8;&#x5EA6;&#x53EF;&#x5B9A;&#x5236;<br>
&#x5728;&#x73B0;&#x6709;&#x7684;&#x8F6F;&#x4EF6;&#x6846;&#x67B6;&#x4E0B;&#xFF0C;&#x901A;&#x8FC7;&#x4E0D;&#x540C;&#x7684;&#x9879;&#x76EE;&#x914D;&#x7F6E;&#xFF0C;&#x53EF;&#x4EE5;&#x5FEB;&#x901F;&#x5B9A;&#x5236;&#x8F6F;&#x9762;&#x677F;&#x7684;&#x76AE;&#x80A4;&#x3001;&#x9875;&#x9762;&#x5E03;&#x5C40;&#x548C;&#x529F;&#x80FD;&#x6309;&#x94AE;&#xFF0C;&#x5B9E;&#x73B0;&#x4E0E;&#x7CFB;&#x7EDF;&#x7684;&#x4EA4;&#x4E92;&#x3002;</li>
<li>&#x652F;&#x6301;PLC-IO&#x8F93;&#x5165;&#xFF0C;&#x5E76;&#x5B9E;&#x65F6;&#x663E;&#x793A;&#x8F93;&#x51FA;&#x72B6;&#x6001;</li>
<li>&#x652F;&#x6301;shell&#x547D;&#x4EE4;&#x6267;&#x884C;<br>
&#x901A;&#x8FC7;shell&#x7684;&#x652F;&#x6301;&#xFF0C;&#x95F4;&#x63A5;&#x5B9E;&#x73B0;&#x4E86;&#x5404;&#x7C7B;&#x7A0B;&#x5E8F;/&#x811A;&#x672C;&#x7684;&#x8C03;&#x7528;&#x3002;</li>
<li>&#x8F6F;&#x952E;&#x76D8;&#x7A97;&#x53E3;&#x60AC;&#x6D6E;</li>
<li>&#x652F;&#x6301;&#x6309;&#x952E;&#x9ECF;&#x6EDE;&#xFF08;&#x4EE5;&#x53CA;&#x8F7B;&#x9ECF;&#x6EDE;&#xFF1A;Just_for_once&#xFF09;</li>
<li>&#x652F;&#x6301;&#x6309;&#x952E;&#x7EC4;&#x5408;&#x529F;&#x80FD;</li>
<li>&#x652F;&#x6301;&#x81EA;&#x5B9A;&#x4E49;&#x529F;&#x80FD;&#x952E;<br>
&#x8F6F;&#x9762;&#x677F;&#x63D0;&#x4F9B;&#x4E86;3&#x4E2A;&#x9884;&#x5B9A;&#x4E49;&#x529F;&#x80FD;&#x952E;&#xFF1A;UDF&#x3001;UDF2&#x3001;UDF3&#xFF0C;&#x53EF;&#x7528;&#x4E8E;&#x8BBE;&#x5B9A;&#x975E;&#x6807;&#x51C6;&#x7684;&#x7B2C;&#x4E8C;&#x952E;&#x503C;&#x3001;&#x7EC4;&#x5408;&#x952E;&#x503C;&#x7B49;&#x529F;&#x80FD;&#x3002;</li>
<li>&#x652F;&#x6301;&#x5B9A;&#x4E49;&#x952E;&#x76D8;&#x5B8F;&#x4E8B;&#x4EF6;<br>
&#x901A;&#x8FC7;&#x5B9A;&#x4E49;&#x5B8F;&#x4E8B;&#x4EF6;&#xFF0C;&#x53EF;&#x4EE5;&#x81EA;&#x7531;&#x7EC4;&#x5408;&#x952E;&#x76D8;&#x529F;&#x80FD;&#xFF0C;&#x5982;&#x5C06;&#x591A;&#x4E2A;&#x6309;&#x952E;&#x7684;&#x590D;&#x6742;&#x64CD;&#x4F5C;&#x7EC4;&#x5408;&#x6210;&#x5355;&#x4E00;&#x52A8;&#x4F5C;&#xFF0C;&#x5B9E;&#x73B0;&#x4E00;&#x952E;&#x529F;&#x80FD;&#x8C03;&#x7528;&#x3002;</li>
<li>&#x652F;&#x6301;&#x80CC;&#x666F;&#x56FE;&#x7247;&#x7F29;&#x653E;&#xFF0C;&#x81EA;&#x9002;&#x5E94;&#x684C;&#x9762;&#x5C3A;&#x5BF8;</li>
<li>&#x96C6;&#x6210;&#x8F6F;&#x952E;&#x76D8;&#x4E13;&#x7528;xml&#x7F16;&#x8F91;&#x5668;&#xFF1A;DataEditor(Console&#x7248;&#x672C;)</li>
<li>&#x63D0;&#x4F9B;D-Bus&#x670D;&#x52A1;&#x63A5;&#x53E3;&#xFF0C;&#x5B9E;&#x73B0;&#x8F6F;&#x952E;&#x76D8;&#x7684;RPC&#x63A7;&#x5236;</li>
</ul>
<h1 class="mume-header" id="5-%E6%9E%B6%E6%9E%84%E8%AF%B4%E6%98%8E">5. &#x67B6;&#x6784;&#x8BF4;&#x660E;</h1>

<p>&#x8F6F;&#x4EF6;&#x76D8;&#x7A0B;&#x5E8F;&#x76EE;&#x5F55;&#xFF1A; $NUTHOME/bin/virtkeyboard</p>
<p>&#x547D;&#x4EE4;&#x884C;&#x53C2;&#x6570;&#xFF1A;</p>
<pre data-role="codeBlock" data-info="" class="language-"><code>Virtual Keyboard&#x3010;v3.5.5&#x3011;2018/09/30

positional arguments:
  path_xml                      the path of the [config].xml

optional arguments:
  -h, --help                    show this help message and exit
  -x POS_X, --pos_x POS_X       position of the window: x
  -y POS_Y, --pos_y POS_Y       position of the window: y
  -w SIZE_W, --size_w SIZE_W    size of the window: width
  -H SIZE_H, --size_h SIZE_H    size of the window: height
</code></pre><h1 class="mume-header" id="6-%E9%99%90%E5%88%B6%E8%AF%B4%E6%98%8E">6. &#x9650;&#x5236;&#x8BF4;&#x660E;</h1>

<h2 class="mume-header" id="61-vnc%E7%8E%AF%E5%A2%83">6.1. VNC&#x73AF;&#x5883;</h2>

<p>&#x7531;&#x4E8E;VNC&#x5BF9;XKBlib&#x7684;&#x652F;&#x6301;&#x4E0D;&#x591F;&#xFF0C;&#x5BFC;&#x81F4;&#x5728;VNC&#x73AF;&#x5883;&#x4E0B;&#xFF0C;&#x865A;&#x62DF;&#x952E;&#x76D8;&#x65E0;&#x6CD5;&#x6B63;&#x5E38;&#x6A21;&#x62DF;&#x6309;&#x952E;&#x7684;&#x8F93;&#x51FA;&#xFF1B;&#x4F46;&#x4E0D;&#x5F71;&#x54CD;&#x8BF8;&#x5982;PLC-IO&#x7684;&#x8F93;&#x51FA;&#x4EE5;&#x53CA;shell&#x811A;&#x672C;&#x7684;&#x8C03;&#x7528;&#x3002;</p>
<p><img src="./res/vnc_fail.png" alt=""></p>
<p>&#x5982;&#x4E0A;&#x56FE;&#xFF0C;VNC&#x73AF;&#x5883;&#x4E0B;&#xFF0C;&#x9762;&#x677F;&#x53EF;&#x4EE5;&#x6B63;&#x5E38;&#x542F;&#x52A8;&#xFF0C;&#x4F46;&#x65E0;&#x6CD5;&#x4ECE;X server&#x83B7;&#x53D6;&#x5230;keyboard&#x3002;</p>
<h1 class="mume-header" id="7-%E7%9A%AE%E8%82%A4%E9%85%8D%E7%BD%AE">7. &#x76AE;&#x80A4;&#x914D;&#x7F6E;</h1>

<h2 class="mume-header" id="71-%E7%9A%AE%E8%82%A4%E7%9A%84%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6">7.1. &#x76AE;&#x80A4;&#x7684;&#x914D;&#x7F6E;&#x6587;&#x4EF6;</h2>

<ul>
<li>&#x542F;&#x52A8;&#x811A;&#x672C;<br>
&#x901A;&#x8FC7;&#x542F;&#x52A8;&#x811A;&#x672C;&#xFF0C;&#x542F;&#x52A8;&#x8F6F;&#x952E;&#x76D8;&#x7A0B;&#x5E8F;&#xFF1B;&#x540C;&#x65F6;&#x53EF;&#x4EE5;&#x5728;&#x811A;&#x672C;&#x4E2D;&#x5B9A;&#x4E49;&#x8F6F;&#x952E;&#x76D8;&#x7684;&#x542F;&#x52A8;&#x9009;&#x9879;&#xFF0C;&#x5982;&#x542F;&#x52A8;&#x4F4D;&#x7F6E;&#x3001;&#x7A97;&#x53E3;&#x5C3A;&#x5BF8;&#x7B49;&#x3002;</li>
<li>xml&#x914D;&#x7F6E;&#x6587;&#x4EF6;<br>
&#x7528;&#x4E8E;&#x5B9A;&#x4E49;&#x8F6F;&#x952E;&#x76D8;&#x7684;&#x5143;&#x7D20;&#x3001;&#x529F;&#x80FD;&#x53CA;&#x9875;&#x9762;&#x5E03;&#x5C40;&#x3002;</li>
<li>svg&#x5E03;&#x5C40;&#x6587;&#x4EF6;<br>
&#x5B58;&#x50A8;&#x4E86;&#x7A97;&#x53E3;&#x7684;&#x6574;&#x4F53;&#x5C3A;&#x5BF8;&#xFF0C;&#x4EE5;&#x53CA;&#x6BCF;&#x4E2A;&#x6309;&#x94AE;&#x7684;&#x5C3A;&#x5BF8;&#x548C;&#x4F4D;&#x7F6E;&#x3002;</li>
<li>qss&#x914D;&#x7F6E;&#x6587;&#x4EF6;<br>
&#x7528;&#x4E8E;&#x5B9A;&#x4E49;&#x8F6F;&#x952E;&#x76D8;&#x7684;UI&#x663E;&#x793A;&#x6837;&#x5F0F;&#xFF0C;&#x901A;&#x8FC7;&#x52A0;&#x8F7D;&#x4E0D;&#x540C;&#x7684;&#x6837;&#x5F0F;&#x9009;&#x9879;&#xFF0C;&#x8C03;&#x6574;UI&#x56FE;&#x5143;&#x7684;&#x663E;&#x793A;&#x3001;&#x6267;&#x884C;&#x6548;&#x679C;&#x3002;</li>
</ul>
<h2 class="mume-header" id="72-%E8%BF%9B%E7%A8%8B%E9%97%B4%E5%8A%9F%E8%83%BD%E8%B0%83%E7%94%A8">7.2. &#x8FDB;&#x7A0B;&#x95F4;&#x529F;&#x80FD;&#x8C03;&#x7528;</h2>

<p>&#x8F6F;&#x952E;&#x76D8;&#x63D0;&#x4F9B;&#x4E86;&#x82E5;&#x5E72;dbus&#x63A5;&#x53E3;&#xFF0C;&#x652F;&#x6301;&#x5176;&#x4ED6;&#x7A0B;&#x5E8F;&#x5BF9;&#x8F6F;&#x952E;&#x76D8;&#x5B9E;&#x73B0;&#x63A7;&#x5236;&#x3002;&#x6700;&#x65B0;&#x7248;&#x672C;&#x7684;dbus&#x63A5;&#x53E3;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;d-feet&#x7A0B;&#x5E8F;&#x67E5;&#x770B;&#xFF0C;&#x6548;&#x679C;&#x5982;&#x4E0B;&#x56FE;&#xFF1A;</p>
<p><img src="./res/dbus.png" alt=""></p>
<p>&#x5E38;&#x7528;&#x63A5;&#x53E3;&#x5305;&#x62EC;&#xFF1A;</p>
<ul>
<li>vkb_hide()<br>
&#x9690;&#x85CF;&#x9762;&#x677F;</li>
<li>vkb_show()<br>
&#x663E;&#x793A;&#x9762;&#x677F;</li>
<li>vkb_quit()<br>
&#x9000;&#x51FA;&#x8F6F;&#x952E;&#x76D8;&#x7A0B;&#x5E8F;</li>
<li>vkb_lock()<br>
&#x9501;&#x5B9A;&#x8F6F;&#x952E;&#x76D8;</li>
<li>vkb_unlock()<br>
&#x89E3;&#x9501;&#x8F6F;&#x952E;&#x76D8;</li>
</ul>
<h2 class="mume-header" id="73-%E5%B8%83%E5%B1%80%E6%96%87%E4%BB%B6%E7%9A%84%E9%85%8D%E7%BD%AE">7.3. &#x5E03;&#x5C40;&#x6587;&#x4EF6;&#x7684;&#x914D;&#x7F6E;</h2>

<p>&#x5E03;&#x5C40;&#x6587;&#x4EF6;&#x901A;&#x8FC7;XML&#x683C;&#x5F0F;&#x5B9A;&#x4E49;&#xFF0C;&#x5176;&#x6574;&#x4F53;&#x7ED3;&#x6784;&#x5982;&#x4E0B;&#xFF1A;</p>
<ol>
<li>&#x7A97;&#x53E3;&#x5C42;<br>
&#x5B9A;&#x4E49;&#x8F6F;&#x952E;&#x76D8;&#x7A97;&#x53E3;&#x7684;&#x9ED8;&#x8BA4;&#x5C3A;&#x5BF8;&#x3001;&#x4F4D;&#x7F6E;&#x7B49;&#x4FE1;&#x606F;&#xFF0C;&#x9875;&#x9762;&#x6837;&#x5F0F;&#xFF0C;&#x4EE5;&#x53CA;&#x9ED8;&#x8BA4;&#x7684;Page&#x9875;&#x9762;&#xFF1B;&#x4E00;&#x4E2A;&#x7A97;&#x53E3;&#x53EF;&#x4EE5;&#x5305;&#x542B;&#x591A;&#x4E2A;&#x9875;&#x9762;&#xFF0C;&#x7528;&#x4E8E;&#x663E;&#x793A;&#x4E0D;&#x540C;&#x7684;&#x5E03;&#x5C40;&#x6837;&#x5F0F;&#xFF1B;</li>
<li>&#x9875;&#x9762;&#x5C42;<br>
&#x5B9A;&#x4E49;&#x4E86;&#x9875;&#x9762;&#x7684;&#x663E;&#x793A;&#x5185;&#x5BB9;&#xFF0C;&#x5982;&#x80CC;&#x666F;&#x56FE;&#x7247;&#x3001;Button&#x7684;&#x6392;&#x5E03;&#x53CA;&#x72B6;&#x6001;&#x4FE1;&#x606F;&#xFF1B;&#x6BCF;&#x4E2A;&#x9875;&#x9762;&#x5305;&#x542B;&#x4E86;&#x591A;&#x4E2A;Button&#x6309;&#x94AE;&#xFF1B;</li>
<li>&#x6309;&#x94AE;&#x5C42;<br>
&#x5B9A;&#x4E49;&#x4E86;&#x6309;&#x94AE;&#x7684;&#x5C5E;&#x6027;&#xFF0C;&#x5305;&#x62EC;Btn-ID&#x3001;&#x6587;&#x672C;&#x3001;&#x4F4D;&#x7F6E;&#x4FE1;&#x606F;&#x3001;&#x53EF;&#x5426;&#x9ECF;&#x6EDE;&#x3001;&#x80CC;&#x666F;&#x56FE;&#x7247;&#x7B49;&#x7B49;&#xFF1B;&#x6BCF;&#x4E2A;&#x6309;&#x94AE;&#x53EF;&#x4EE5;&#x5305;&#x542B;&#x591A;&#x4E2A;&#x6267;&#x884C;&#x547D;&#x4EE4;&#x3002;</li>
<li>&#x547D;&#x4EE4;&#x5C42;<br>
&#x5B9A;&#x4E49;&#x4E86;&#x6309;&#x94AE;&#x7684;&#x6267;&#x884C;&#x6307;&#x4EE4;&#xFF0C;&#x53EF;&#x4EE5;&#x662F;&#x6A21;&#x62DF;&#x952E;&#x76D8;IO&#x3001;PLC-IO&#x6216;&#x662F;&#x8C03;&#x7528;bash&#x811A;&#x672C;&#xFF1B;&#x540C;&#x65F6;&#x547D;&#x4EE4;&#x8FD8;&#x53EF;&#x4EE5;&#x662F;&#x591A;&#x4E2A;&#x6309;&#x952E;&#x7684;&#x7EC4;&#x5408;&#xFF08;&#x5B8F;&#xFF09;&#xFF0C;&#x5E76;&#x5177;&#x4F53;&#x5B9A;&#x4E49;&#x52A8;&#x4F5C;&#x7684;&#x5C5E;&#x6027;&#x4EE5;&#x53CA;&#x6267;&#x884C;&#x987A;&#x5E8F;&#x3002;</li>
</ol>
<h2 class="mume-header" id="74-%E5%B8%83%E5%B1%80%E6%96%87%E4%BB%B6%E7%9A%84%E5%8F%AF%E7%94%A8%E6%A0%87%E7%AD%BE">7.4. &#x5E03;&#x5C40;&#x6587;&#x4EF6;&#x7684;&#x53EF;&#x7528;&#x6807;&#x7B7E;</h2>

<h3 class="mume-header" id="741-keyboard">7.4.1. &lt;keyboard&gt;</h3>

<p>&#x56FA;&#x5B9A;&#x5C5E;&#x6027;</p>
<ul>
<li>default_page<br>
&#x7A97;&#x53E3;&#x9ED8;&#x8BA4;&#x8F7D;&#x5165;&#x7684;&#x9875;&#x9762;</li>
</ul>
<p>&#x53EF;&#x9009;&#x5C5E;&#x6027;</p>
<ul>
<li>qssfile<br>
&#x7A97;&#x53E3;&#x52A0;&#x8F7D;&#x7684;QSS&#x6837;&#x5F0F;&#x8868;&#x6587;&#x4EF6;</li>
<li>[x,y,w,h]<br>
&#x7A97;&#x53E3;&#x4F4D;&#x7F6E;</li>
</ul>
<p>&#x5B50;&#x6807;&#x7B7E;</p>
<ul>
<li>page</li>
</ul>
<h3 class="mume-header" id="742-page">7.4.2. &lt;page&gt;</h3>

<p>&#x56FA;&#x5B9A;&#x5C5E;&#x6027;</p>
<ul>
<li>id</li>
</ul>
<p>&#x53EF;&#x9009;&#x5C5E;&#x6027;</p>
<ul>
<li>svgfile<br>
&#x81EA;&#x52A8;&#x67E5;&#x8BE2;svg&#x6587;&#x4EF6;&#x5E76;&#x5C06;&#x56FE;&#x7247;&#x5C3A;&#x5BF8;&#x548C;&#x6BCF;&#x4E2A;&#x5BF9;&#x5E94;&#x7684;button&#x7684;&#x4F4D;&#x7F6E;&#x8F7D;&#x5165;&#x5185;&#x5B58;&#xFF0C;&#x5982;&#x4E0D;&#x5B58;&#x5728;&#x8BE5;&#x9879;&#xFF0C;&#x5219;&#x9700;&#x8981;&#x6BCF;&#x4E2A;button&#x6DFB;&#x52A0;[x,y,w,h]&#x5C5E;&#x6027;&#x4FE1;&#x606F;</li>
<li>image<br>
&#x8BE5;&#x9875;&#x9762;&#x7684;&#x80CC;&#x666F;&#x56FE;&#x7247;&#xFF0C;&#x5982;&#x4E0D;&#x5B58;&#x5728;&#x8BE5;&#x9879;&#xFF0C;&#x6309;&#x7167;qss&#x8BFB;&#x53D6;&#x80CC;&#x666F;&#x989C;&#x8272;</li>
</ul>
<p>&#x5B50;&#x6807;&#x7B7E;</p>
<ul>
<li>btn</li>
</ul>
<h3 class="mume-header" id="743-btn">7.4.3. &lt;btn&gt;</h3>

<p>&#x56FA;&#x5B9A;&#x5C5E;&#x6027;</p>
<ul>
<li>id</li>
</ul>
<p>&#x53EF;&#x9009;&#x5C5E;&#x6027;</p>
<ul>
<li>text<br>
&#x6309;&#x94AE;&#x7684;Label&#x6587;&#x672C;</li>
<li>image<br>
&#x80CC;&#x666F;&#x56FE;&#x7247;&#xFF0C;&#x5982;&#x4E0D;&#x5B58;&#x5728;&#x8BE5;&#x9879;&#xFF0C;&#x6309;&#x7167;qss&#x8BFB;&#x53D6;&#x80CC;&#x666F;&#x989C;&#x8272;</li>
<li>sticky<br>
&#x53EF;&#x5426;&#x9ECF;&#x6EDE;(boolean)&#xFF0C;&#x8BE5;&#x5C5E;&#x6027;&#x5C06;&#x4F5C;&#x7528;&#x4E8E;&#x6309;&#x94AE;&#x4E2D;&#x6240;&#x6709;&#x5B50;&#x547D;&#x4EE4;&#x7684;&#x6267;&#x884C;&#x65B9;&#x5F0F;</li>
</ul>
<p>&#x53EF;&#x9009;&#x5B50;&#x6807;&#x7B7E;</p>
<ul>
<li>key_char<br>
&#x952E;&#x76D8;&#x5B57;&#x7B26;&#x952E;&#x4F4D;&#xFF0C;&#x5982;&quot;a&quot;&#x3001;&quot;T&quot;&#x3001;&quot;enter&quot;...</li>
<li>key_mode<br>
&#x952E;&#x76D8;&#x6A21;&#x5F0F;&#x952E;&#x4F4D;&#xFF0C;&#x5982;&quot;Shift&quot;&#x3001;&quot;Ctrl&quot;&#x3001;&quot;Atl&quot;...</li>
<li>key_func<br>
&#x952E;&#x76D8;&#x529F;&#x80FD;&#x952E;&#x4F4D;&#xFF0C;&#x5982;&quot;F1&quot;&#x3001;&quot;delete&quot;&#x3001;&quot;page_up&quot;&#x3001;&quot;left&quot;...</li>
<li>key_comb<br>
&#x952E;&#x76D8;&#x7EC4;&#x5408;&#x952E;&#x4F4D;&#xFF0C;&#x5982;&quot;UDF&quot;,&quot;UDF2&quot;,&quot;UDF+Ctrl&quot;...</li>
<li>plc<br>
PLC IO&#x70B9;&#x4F4D;</li>
<li>shell<br>
&#x6309;&#x94AE;&#x6267;&#x884C;&#x811A;&#x672C;&#xFF0C;&#x5982;&quot;zenity ...&quot;,&quot;./xxx/file.sh&quot;,&quot;python /xxx/file.py&quot;</li>
<li>macro<br>
&#x5B8F;&#x4E8B;&#x4EF6;&#xFF0C;&#x5B9A;&#x4E49;Button&#x7684;&#x5177;&#x4F53;&#x52A8;&#x4F5C;&#xFF0C;&#x53EF;&#x4EE5;&#x7EC4;&#x5408;&#x591A;&#x4E2A;&#x6307;&#x4EE4;&#xFF0C;&#x4E00;&#x5E76;&#x6267;&#x884C;</li>
</ul>
<h3 class="mume-header" id="744-key_xxx">7.4.4. &lt;key_xxx&gt;</h3>

<p>&#x56FA;&#x5B9A;&#x5C5E;&#x6027;</p>
<ul>
<li>key
&#x952E;&#x503C;</li>
</ul>
<p>&#x53EF;&#x9009;&#x5C5E;&#x6027;</p>
<ul>
<li>isPressed<br>
&#x52A8;&#x4F5C;(boolean)&#xFF0C;&#x6839;&#x636E; &#x201C;&#x6309;&#x4E0B;/&#x62AC;&#x8D77;&#x201D;&#x3000;&#x9009;&#x62E9; &quot;true&quot;/&quot;false&quot;&#xFF0C;&#x4E00;&#x822C;&#x5728;&lt;macro&gt;&#x6807;&#x7B7E;&#x4E2D;&#x4F7F;&#x7528;</li>
</ul>
<p>&#x952E;&#x503C;&#x5217;&#x8868;</p>
<ul>
<li>key_char
<ul>
<li>[a-z]</li>
<li>[A-Z]</li>
<li>[0-9]</li>
<li>[$...&amp;]  --&gt; &#x5404;&#x7C7B;&#x7B26;&#x53F7;</li>
<li>unxml_key  --&gt;  &#x7531;&#x4E8E;xml&#x8BED;&#x6CD5;&#x4E0D;&#x652F;&#x6301;&#x67D0;&#x4E9B;&#x5B57;&#x7B26;&#xFF0C;&#x63D0;&#x4F9B;&#x975E;&#x6807;&#x51C6;&#x8F6C;&#x4E49;&#x952E;&#x503C;&#x9879;
<ul>
<li>&quot;angle_brackets&quot;  --&gt;  &quot;&lt;&quot;</li>
<li>&quot;SPC_0&quot;  --&gt;  &quot;&lt;&quot;</li>
<li>&quot;backslash&quot;  --&gt;  &quot;\&quot;</li>
<li>&quot;SPC_1&quot;  --&gt;  &quot;\&quot;</li>
<li>&quot;ampersand&quot;  --&gt;  &quot;&amp;&quot;</li>
<li>&quot;SPC_2&quot;  --&gt;  &quot;&amp;&quot;</li>
</ul>
</li>
</ul>
</li>
<li>key_mode
<ul>
<li>&quot;Shift&quot;</li>
<li>&quot;Caps&quot;</li>
<li>&quot;Ctrl&quot;</li>
<li>&quot;Alt&quot;</li>
<li>&quot;NMLK&quot;</li>
<li>&quot;MOD3&quot;</li>
<li>&quot;Super&quot;</li>
<li>&quot;AltGr&quot;</li>
<li>&quot;UDF&quot;</li>
<li>&quot;UDF2&quot;</li>
<li>&quot;UDF3&quot;</li>
</ul>
</li>
<li>key_func
<ul>
<li>&quot;enter&quot;</li>
<li>&quot;kp_space&quot;</li>
<li>&quot;insert&quot;</li>
<li>&quot;home&quot;</li>
<li>&quot;page_up&quot;</li>
<li>&quot;page_down&quot;</li>
<li>&quot;end&quot;</li>
<li>&quot;delete&quot;</li>
<li>&quot;return&quot;</li>
<li>&quot;backspace&quot;</li>
<li>&quot;left&quot;</li>
<li>&quot;up&quot;</li>
<li>&quot;right&quot;</li>
<li>&quot;down&quot;</li>
<li>&quot;esc&quot;</li>
<li>&quot;prnt&quot;</li>
<li>&quot;scroll&quot;</li>
<li>&quot;pause&quot;</li>
<li>[&quot;F1&quot;-&quot;F12&quot;]</li>
</ul>
</li>
</ul>
<h3 class="mume-header" id="745-plc">7.4.5. &lt;plc&gt;</h3>

<p>&#x5FC5;&#x586B;&#x5C5E;&#x6027;</p>
<ul>
<li>input
&#x8F93;&#x5165;IO&#x70B9;&#x4F4D;&#xFF0C;&#x5176;&#x683C;&#x5F0F;&#x4E3A; &quot;byte.bit&quot;&#xFF0C;&#x5982; &quot;1010.0&quot;</li>
<li>output
&#x8F93;&#x51FA;IO&#x70B9;&#x4F4D;&#xFF0C;&#x683C;&#x5F0F;&#x540C;input</li>
<li>offset
&#x5B9A;&#x4E49;&#x8F93;&#x51FA;IO&#x5730;&#x5740;&#x76F8;&#x5BF9;&#x4E8E;&#x8F93;&#x5165;&#x7684;&#x504F;&#x79FB;&#x503C;&#xFF0C;&#x76F8;&#x5F53;&#x4E8E;&#x5B9A;&#x4E49;&#x4E86;output=input+offset&#xFF08;&#x5F53;&#x4E0E;output&#x540C;&#x65F6;&#x5B58;&#x5728;&#x65F6;&#xFF0C;&#x8BE5;&#x9009;&#x9879;&#x5931;&#x6548;&#xFF09;</li>
</ul>
<h3 class="mume-header" id="746-shell">7.4.6. &lt;shell&gt;</h3>

<p>&#x56FA;&#x5B9A;&#x5C5E;&#x6027;</p>
<ul>
<li>cmd
&#x6267;&#x884C;&#x7684;shell&#x547D;&#x4EE4;</li>
</ul>
<h2 class="mume-header" id="75-qss%E6%A0%B7%E5%BC%8F%E8%A1%A8">7.5. QSS&#x6837;&#x5F0F;&#x8868;</h2>

<h3 class="mume-header" id="751-%E7%AA%97%E5%8F%A3%E5%B1%9E%E6%80%A7%E7%9A%84%E9%85%8D%E7%BD%AE">7.5.1. &#x7A97;&#x53E3;&#x5C5E;&#x6027;&#x7684;&#x914D;&#x7F6E;</h3>

<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token selector">QFrame
</span><span class="token punctuation">{</span>
    <span class="token property">background-color</span><span class="token punctuation">:</span> <span class="token function">rgba</span><span class="token punctuation">(</span><span class="token number">60</span>,<span class="token number">67</span>,<span class="token number">77</span>,<span class="token number">255</span><span class="token punctuation">)</span><span class="token punctuation">;</span>       <span class="token comment">/*&#x7A97;&#x53E3;&#x80CC;&#x666F;&#x8272;*/</span>
<span class="token punctuation">}</span>
</pre><h3 class="mume-header" id="752-%E6%8C%89%E9%92%AE%E7%9A%84%E9%9D%99%E6%80%81%E6%A0%B7%E5%BC%8F">7.5.2. &#x6309;&#x94AE;&#x7684;&#x9759;&#x6001;&#x6837;&#x5F0F;</h3>

<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token selector">NonImgButton
</span><span class="token punctuation">{</span>
    <span class="token property">background-color</span><span class="token punctuation">:</span> <span class="token function">rgb</span><span class="token punctuation">(</span><span class="token number">99</span>,<span class="token number">113</span>,<span class="token number">122</span><span class="token punctuation">)</span><span class="token punctuation">;</span>          <span class="token comment">/*&#x80CC;&#x666F;&#x8272;*/</span>
    <span class="token property">border-width</span><span class="token punctuation">:</span> <span class="token number">1</span>px<span class="token punctuation">;</span>                          <span class="token comment">/*&#x8FB9;&#x6846;&#x5BBD;&#x5EA6;&#x4E3A;1&#x50CF;&#x7D20;*/</span>
    <span class="token property">border-radius</span><span class="token punctuation">:</span> <span class="token number">5</span>px<span class="token punctuation">;</span>                         <span class="token comment">/*&#x8FB9;&#x6846;&#x5706;&#x89D2;&#x534A;&#x5F84;*/</span>
    <span class="token property">border-color</span><span class="token punctuation">:</span> <span class="token function">rgba</span><span class="token punctuation">(</span><span class="token number">255</span>, <span class="token number">225</span>, <span class="token number">255</span><span class="token punctuation">)</span><span class="token punctuation">;</span>          <span class="token comment">/*&#x8FB9;&#x6846;&#x989C;&#x8272;*/</span>
    <span class="token property">font</span><span class="token punctuation">:</span> <span class="token number">14</span>px <span class="token string">&quot;Helvetica&quot;</span><span class="token punctuation">;</span>                     <span class="token comment">/*&#x5B57;&#x4F53;*/</span>
        <span class="token property">color</span><span class="token punctuation">:</span> <span class="token function">rgb</span><span class="token punctuation">(</span><span class="token number">248</span>,<span class="token number">255</span>,<span class="token number">255</span><span class="token punctuation">)</span><span class="token punctuation">;</span>                <span class="token comment">/*&#x5B57;&#x4F53;&#x989C;&#x8272;*/</span>
<span class="token punctuation">}</span>
</pre><h3 class="mume-header" id="753-%E6%8C%89%E9%92%AE%E5%9C%A8%E6%8C%89%E4%B8%8B%E7%8A%B6%E6%80%81%E7%9A%84%E6%98%BE%E7%A4%BA%E6%A0%B7%E5%BC%8F">7.5.3. &#x6309;&#x94AE;&#x5728;&#x6309;&#x4E0B;&#x72B6;&#x6001;&#x7684;&#x663E;&#x793A;&#x6837;&#x5F0F;</h3>

<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token selector">NonImgButton<span class="token pseudo-class">:pressed</span>
</span><span class="token punctuation">{</span>
    <span class="token property">background-color</span><span class="token punctuation">:</span> <span class="token function">rgb</span><span class="token punctuation">(</span><span class="token number">71</span>,<span class="token number">84</span>,<span class="token number">93</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token property">font</span><span class="token punctuation">:</span> bold <span class="token number">14</span>px <span class="token string">&quot;Helvetica&quot;</span><span class="token punctuation">;</span>                <span class="token comment">/*&#x5B57;&#x4F53;*/</span>
        <span class="token property">color</span><span class="token punctuation">:</span> <span class="token function">rgb</span><span class="token punctuation">(</span><span class="token number">255</span>,<span class="token number">255</span>,<span class="token number">255</span><span class="token punctuation">)</span><span class="token punctuation">;</span>                <span class="token comment">/*&#x5B57;&#x4F53;&#x989C;&#x8272;*/</span>
<span class="token punctuation">}</span>
</pre><h3 class="mume-header" id="754-%E6%8C%89%E9%92%AE%E5%9C%A8%E9%BC%A0%E6%A0%87%E6%82%AC%E5%81%9C%E6%97%B6%E7%9A%84%E6%98%BE%E7%A4%BA%E6%A0%B7%E5%BC%8F">7.5.4. &#x6309;&#x94AE;&#x5728;&#x9F20;&#x6807;&#x60AC;&#x505C;&#x65F6;&#x7684;&#x663E;&#x793A;&#x6837;&#x5F0F;</h3>

<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token selector">NonImgButton<span class="token pseudo-class">:hover</span>
</span><span class="token punctuation">{</span>
    <span class="token property">background-color</span><span class="token punctuation">:</span> <span class="token function">rgb</span><span class="token punctuation">(</span><span class="token number">88</span>,<span class="token number">24</span>,<span class="token number">106</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</pre><h3 class="mume-header" id="755-%E6%8C%89%E9%92%AE%E9%BB%8F%E6%BB%9E%E7%8A%B6%E6%80%81%E7%9A%84%E6%98%BE%E7%A4%BA%E6%A0%B7%E5%BC%8F">7.5.5. &#x6309;&#x94AE;&#x9ECF;&#x6EDE;&#x72B6;&#x6001;&#x7684;&#x663E;&#x793A;&#x6837;&#x5F0F;</h3>

<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token selector">NonImgButton<span class="token attribute">[sticky_status=&quot;sticky&quot;]</span>
</span><span class="token punctuation">{</span>
    <span class="token property">background-color</span><span class="token punctuation">:</span> <span class="token function">rgb</span><span class="token punctuation">(</span><span class="token number">215</span>,<span class="token number">186</span>,<span class="token number">125</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token property">color</span><span class="token punctuation">:</span> <span class="token function">rgba</span><span class="token punctuation">(</span><span class="token number">0</span>, <span class="token number">0</span>, <span class="token number">0</span>, <span class="token number">100</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</pre><h3 class="mume-header" id="756-%E6%8C%89%E9%92%AE%E8%BD%BB%E9%BB%8F%E6%BB%9E%E7%8A%B6%E6%80%81%E7%9A%84%E6%98%BE%E7%A4%BA%E6%A0%B7%E5%BC%8F">7.5.6. &#x6309;&#x94AE;&#x8F7B;&#x9ECF;&#x6EDE;&#x72B6;&#x6001;&#x7684;&#x663E;&#x793A;&#x6837;&#x5F0F;</h3>

<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token selector">NonImgButton<span class="token attribute">[sticky_status=&quot;light_sticky&quot;]</span>
</span><span class="token punctuation">{</span>
    <span class="token property">background-color</span><span class="token punctuation">:</span> <span class="token function">rgb</span><span class="token punctuation">(</span><span class="token number">161</span>, <span class="token number">223</span>, <span class="token number">198</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</pre><h1 class="mume-header" id="8-%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B">8. &#x4F7F;&#x7528;&#x793A;&#x4F8B;</h1>

<p><img src="res/sample.png" alt=""></p>
<h2 class="mume-header" id="81-%E5%88%9B%E5%BB%BA%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84">8.1. &#x521B;&#x5EFA;&#x76EE;&#x5F55;&#x7ED3;&#x6784;</h2>

<p><img src="res/skin_dir.png" alt=""></p>
<p>&#x5982;&#x56FE;&#xFF0C;&#x793A;&#x4F8B;&#x76AE;&#x80A4; &quot;virtkeybaord/sample/&quot; &#x7684;&#x76EE;&#x5F55;&#x7ED3;&#x6784;&#x5982;&#x4E0B;&#xFF1A;</p>
<ul>
<li>res/<br>
&#x8BE5;&#x76EE;&#x5F55;&#x4E0B;&#x5B58;&#x653E;&#x4E86;&#x8D44;&#x6E90;&#x6587;&#x4EF6;&#xFF08;&#x56FE;&#x7247;&#xFF09;&#xFF1B;</li>
<li>shell/<br>
&#x8BE5;&#x76EE;&#x5F55;&#x7528;&#x4E8E;&#x5B58;&#x653E;&#x6309;&#x94AE;&#x8C03;&#x7528;&#x7684;&#x6267;&#x884C;&#x811A;&#x672C;&#xFF1B;</li>
<li><a href="http://start.sh">start.sh</a><br>
&#x542F;&#x52A8;&#x811A;&#x672C;</li>
<li>config.xml<br>
xml&#x914D;&#x7F6E;&#x6587;&#x4EF6;</li>
<li>layout.svg<br>
svg&#x5E03;&#x5C40;&#x6587;&#x4EF6;</li>
<li>stylesheet.qss<br>
&#x6837;&#x5F0F;&#x8868;&#x6587;&#x4EF6;</li>
</ul>
<h2 class="mume-header" id="82-%E8%B5%84%E6%BA%90%E6%96%87%E4%BB%B6">8.2. &#x8D44;&#x6E90;&#x6587;&#x4EF6;</h2>

<p>&#x5305;&#x62EC;svg&#x548C;png&#x56FE;&#x7247;&#xFF0C;&#x4E00;&#x822C;&#x7531;UI&#x8BBE;&#x8BA1;&#x5E08;&#x63D0;&#x4F9B;&#x3002;</p>
<h3 class="mume-header" id="821-%E4%BB%80%E4%B9%88%E6%98%AFsvg">8.2.1. &#x4EC0;&#x4E48;&#x662F;svg</h3>

<p>&#x53EF;&#x7F29;&#x653E;&#x77E2;&#x91CF;&#x56FE;&#x5F62;&#x662F;&#x57FA;&#x4E8E;&#x53EF;&#x6269;&#x5C55;&#x6807;&#x8BB0;&#x8BED;&#x8A00;&#xFF08;&#x6807;&#x51C6;&#x901A;&#x7528;&#x6807;&#x8BB0;&#x8BED;&#x8A00;&#x7684;&#x5B50;&#x96C6;&#xFF09;&#xFF0C;&#x7528;&#x4E8E;&#x63CF;&#x8FF0;&#x4E8C;&#x7EF4;&#x77E2;&#x91CF;&#x56FE;&#x5F62;&#x7684;&#x4E00;&#x79CD;&#x56FE;&#x5F62;&#x683C;&#x5F0F;&#x3002;&#x5B83;&#x7531;&#x4E07;&#x7EF4;&#x7F51;&#x8054;&#x76DF;&#x5236;&#x5B9A;&#xFF0C;&#x662F;&#x4E00;&#x4E2A;&#x5F00;&#x653E;&#x6807;&#x51C6;&#x3002;
&#x4E5F;&#x5C31;&#x662F;&#x8BF4;&#xFF0C;svg&#x6587;&#x4EF6;&#x662F;&#x4E00;&#x79CD;&#x6587;&#x672C;&#x6587;&#x4EF6;&#xFF0C;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;notepad/cat/less&#x7B49;&#x6807;&#x51C6;&#x7A0B;&#x5E8F;&#x8BFB;&#x53D6;&#xFF0C;virtkeyboard&#x4E5F;&#x662F;&#x901A;&#x8FC7;&#x8BFB;&#x53D6;&#x8BE5;&#x6587;&#x4EF6;&#x7684;&#x6807;&#x8BB0;&#x8BED;&#x8A00;&#xFF0C;&#x5B9E;&#x73B0;&#x5BF9;&#x56FE;&#x5143;&#x4FE1;&#x606F;&#x7684;&#x5904;&#x7406;&#x3002;
&#x540C;&#x65F6;&#xFF0C;svg&#x4E5F;&#x53EF;&#x4EE5;&#x88AB;&#x73B0;&#x4EE3;&#x6D4F;&#x89C8;&#x5668;&#x3001;&#x4E13;&#x7528;&#x7ED8;&#x56FE;&#x5DE5;&#x5177;&#x7F16;&#x8F91;&#x548C;&#x6E32;&#x67D3;&#xFF0C;&#x4EE5;&#x56FE;&#x7247;&#x7684;&#x5F62;&#x5F0F;&#x5C55;&#x793A;&#x3002;</p>
<h3 class="mume-header" id="822-%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BAsvg">8.2.2. &#x5982;&#x4F55;&#x521B;&#x5EFA;svg</h3>

<p>&#x8BBE;&#x8BA1;&#x5DE5;&#x7A0B;&#x5E08;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x4E13;&#x7528;&#x7684;&#x7ED8;&#x56FE;&#x5DE5;&#x5177;&#x5236;&#x4F5C;SVG&#x56FE;&#x7247;&#x3002;&#x5F53;&#x7136;&#xFF0C;&#x5982;&#x679C;&#x53EA;&#x662F;&#x8F7B;&#x5EA6;&#x7684;&#x8C03;&#x6574;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x901A;&#x8FC7;&#x6587;&#x672C;&#x7A0B;&#x5E8F;&#x8FDB;&#x884C;&#x7F16;&#x8F91;&#xFF1A;</p>
<pre data-role="codeBlock" data-info="xml" class="language-xml"><span class="token prolog">&lt;?xml version=&quot;1.0&quot; ?&gt;</span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>svg</span> <span class="token attr-name">height</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>142<span class="token punctuation">&quot;</span></span> <span class="token attr-name">width</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>188<span class="token punctuation">&quot;</span></span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>svg2<span class="token punctuation">&quot;</span></span> <span class="token attr-name">version</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>1.0<span class="token punctuation">&quot;</span></span> <span class="token attr-name">xmlns</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>http://www.w3.org/2000/svg<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>rect</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>FA0101<span class="token punctuation">&quot;</span></span><span class="token style-attr language-css"><span class="token attr-name"> <span class="token attr-name">style</span></span><span class="token punctuation">=&quot;</span><span class="token attr-value"><span class="token property">fill</span><span class="token punctuation">:</span><span class="token hexcode">#FFFFFF</span><span class="token punctuation">;</span><span class="token property">stroke</span><span class="token punctuation">:</span><span class="token hexcode">#000000</span><span class="token punctuation">;</span></span><span class="token punctuation">&quot;</span></span> <span class="token attr-name">x</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>10<span class="token punctuation">&quot;</span></span> <span class="token attr-name">y</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>15<span class="token punctuation">&quot;</span></span> <span class="token attr-name">width</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>54<span class="token punctuation">&quot;</span></span> <span class="token attr-name">height</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>54<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>
	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>rect</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>FA0102<span class="token punctuation">&quot;</span></span><span class="token style-attr language-css"><span class="token attr-name"> <span class="token attr-name">style</span></span><span class="token punctuation">=&quot;</span><span class="token attr-value"><span class="token property">fill</span><span class="token punctuation">:</span><span class="token hexcode">#FFFFFF</span><span class="token punctuation">;</span><span class="token property">stroke</span><span class="token punctuation">:</span><span class="token hexcode">#000000</span><span class="token punctuation">;</span></span><span class="token punctuation">&quot;</span></span> <span class="token attr-name">x</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>66<span class="token punctuation">&quot;</span></span> <span class="token attr-name">y</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>15<span class="token punctuation">&quot;</span></span> <span class="token attr-name">width</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>54<span class="token punctuation">&quot;</span></span> <span class="token attr-name">height</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>54<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>
	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>rect</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>FA0103<span class="token punctuation">&quot;</span></span><span class="token style-attr language-css"><span class="token attr-name"> <span class="token attr-name">style</span></span><span class="token punctuation">=&quot;</span><span class="token attr-value"><span class="token property">fill</span><span class="token punctuation">:</span><span class="token hexcode">#FFFFFF</span><span class="token punctuation">;</span><span class="token property">stroke</span><span class="token punctuation">:</span><span class="token hexcode">#000000</span><span class="token punctuation">;</span></span><span class="token punctuation">&quot;</span></span> <span class="token attr-name">x</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>122<span class="token punctuation">&quot;</span></span> <span class="token attr-name">y</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>15<span class="token punctuation">&quot;</span></span> <span class="token attr-name">width</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>54<span class="token punctuation">&quot;</span></span> <span class="token attr-name">height</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>54<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>

	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>rect</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>FA0201<span class="token punctuation">&quot;</span></span><span class="token style-attr language-css"><span class="token attr-name"> <span class="token attr-name">style</span></span><span class="token punctuation">=&quot;</span><span class="token attr-value"><span class="token property">fill</span><span class="token punctuation">:</span><span class="token hexcode">#FFFFFF</span><span class="token punctuation">;</span><span class="token property">stroke</span><span class="token punctuation">:</span><span class="token hexcode">#000000</span><span class="token punctuation">;</span></span><span class="token punctuation">&quot;</span></span> <span class="token attr-name">x</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>10<span class="token punctuation">&quot;</span></span> <span class="token attr-name">y</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>75<span class="token punctuation">&quot;</span></span> <span class="token attr-name">width</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>54<span class="token punctuation">&quot;</span></span> <span class="token attr-name">height</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>54<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>
	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>rect</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>FA0202<span class="token punctuation">&quot;</span></span><span class="token style-attr language-css"><span class="token attr-name"> <span class="token attr-name">style</span></span><span class="token punctuation">=&quot;</span><span class="token attr-value"><span class="token property">fill</span><span class="token punctuation">:</span><span class="token hexcode">#FFFFFF</span><span class="token punctuation">;</span><span class="token property">stroke</span><span class="token punctuation">:</span><span class="token hexcode">#000000</span><span class="token punctuation">;</span></span><span class="token punctuation">&quot;</span></span> <span class="token attr-name">x</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>66<span class="token punctuation">&quot;</span></span> <span class="token attr-name">y</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>75<span class="token punctuation">&quot;</span></span> <span class="token attr-name">width</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>54<span class="token punctuation">&quot;</span></span> <span class="token attr-name">height</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>54<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>
	<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>rect</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>FA0203<span class="token punctuation">&quot;</span></span><span class="token style-attr language-css"><span class="token attr-name"> <span class="token attr-name">style</span></span><span class="token punctuation">=&quot;</span><span class="token attr-value"><span class="token property">fill</span><span class="token punctuation">:</span><span class="token hexcode">#FFFFFF</span><span class="token punctuation">;</span><span class="token property">stroke</span><span class="token punctuation">:</span><span class="token hexcode">#000000</span><span class="token punctuation">;</span></span><span class="token punctuation">&quot;</span></span> <span class="token attr-name">x</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>122<span class="token punctuation">&quot;</span></span> <span class="token attr-name">y</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>75<span class="token punctuation">&quot;</span></span> <span class="token attr-name">width</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>54<span class="token punctuation">&quot;</span></span> <span class="token attr-name">height</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>54<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>svg</span><span class="token punctuation">&gt;</span></span>
</pre><h3 class="mume-header" id="823-svg%E6%95%88%E6%9E%9C%E5%B1%95%E7%A4%BA%E9%80%9A%E8%BF%87%E5%9B%BE%E7%89%87%E6%A0%BC%E5%BC%8F%E6%89%93%E5%BC%80">8.2.3. svg&#x6548;&#x679C;&#x5C55;&#x793A;&#xFF08;&#x901A;&#x8FC7;&#x56FE;&#x7247;&#x683C;&#x5F0F;&#x6253;&#x5F00;&#xFF09;</h3>

<p><img src="res/what_is_svg.png" alt=""></p>
<h2 class="mume-header" id="83-%E5%88%9B%E5%BB%BA%E5%90%AF%E5%8A%A8%E8%84%9A%E6%9C%AC">8.3. &#x521B;&#x5EFA;&#x542F;&#x52A8;&#x811A;&#x672C;</h2>

<pre data-role="codeBlock" data-info="bash" class="language-bash">PATH_APPLICATION<span class="token operator">=</span><span class="token string">&quot;<span class="token variable">$NUTHOME</span>/bin/virtkeyboard&quot;</span>
MAIN_FILE<span class="token operator">=</span><span class="token string">&quot;vkb.pyc&quot;</span>
key_size<span class="token operator">=</span><span class="token variable"><span class="token variable">$(</span>samaritan -k<span class="token variable">)</span></span>

PATH_CONFIG<span class="token operator">=</span><span class="token string">&quot;./vkb.xml&quot;</span>

<span class="token comment"># &#x67E5;&#x5230; -1 &#x5219;&#x9000;&#x51FA;</span>
<span class="token function">test</span> <span class="token variable"><span class="token variable">$(</span><span class="token function">expr</span> index $key_size <span class="token string">&quot;-&quot;</span><span class="token variable">)</span></span> -gt 0 <span class="token operator">&amp;&amp;</span> <span class="token keyword">exit</span>

<span class="token comment"># &#x66FF;&#x6362;&#x5B57;&#x7B26;</span>
key_size<span class="token operator">=</span><span class="token variable">${key_size/,/ -y }</span>
key_size<span class="token operator">=</span><span class="token variable">${key_size/,/ -W }</span>
key_size<span class="token operator">=</span><span class="token variable">${key_size/,/ -H }</span>

<span class="token keyword">while</span> <span class="token boolean">true</span><span class="token punctuation">;</span> <span class="token keyword">do</span>
    python3 <span class="token variable">${PATH_APPLICATION}</span>/<span class="token variable">${MAIN_FILE}</span> <span class="token variable">$PATH_CONFIG</span> -x <span class="token variable">$key_size</span>  <span class="token comment"># &amp; &gt;/dev/null 2&gt;&amp;1</span>
    <span class="token keyword">echo</span> <span class="token string">&quot;end at [<span class="token variable"><span class="token variable">$(</span><span class="token function">date</span><span class="token variable">)</span></span>] !&quot;</span> <span class="token operator">&gt;&gt;</span> <span class="token variable">$LOG_FILE</span>
    <span class="token comment"># sleep 1</span>
<span class="token keyword">done</span>
</pre><h2 class="mume-header" id="84-%E5%88%9B%E5%BB%BAxml%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6">8.4. &#x521B;&#x5EFA;xml&#x914D;&#x7F6E;&#x6587;&#x4EF6;</h2>

<p>xml&#x6574;&#x4F53;&#x7ED3;&#x6784;</p>
<pre data-role="codeBlock" data-info="xml" class="language-xml"><span class="token prolog">&lt;?xml version=&quot;1.0&quot;  encoding=&quot;utf-8&quot;?&gt;</span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>keyboard</span> <span class="token attr-name">x</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>40<span class="token punctuation">&quot;</span></span> <span class="token attr-name">y</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>60<span class="token punctuation">&quot;</span></span> <span class="token attr-name">w</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>188<span class="token punctuation">&quot;</span></span> <span class="token attr-name">h</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>142<span class="token punctuation">&quot;</span></span> <span class="token attr-name">default_page</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>MP0<span class="token punctuation">&quot;</span></span>  <span class="token attr-name">qssfile</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>./stylesheet.qss<span class="token punctuation">&quot;</span></span> <span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>page</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>MP0<span class="token punctuation">&quot;</span></span> <span class="token attr-name">image</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>./res/background.png<span class="token punctuation">&quot;</span></span> <span class="token attr-name">svgfile</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>./layout.svg<span class="token punctuation">&quot;</span></span> <span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>btn</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>FA0101<span class="token punctuation">&quot;</span></span> <span class="token attr-name">text</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span><span class="token entity" title="&amp;">&amp;amp;</span><span class="token entity" title="&amp;">&amp;amp;</span><span class="token punctuation">&quot;</span></span> <span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>key_char</span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>a<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>btn</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>page</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>keyboard</span><span class="token punctuation">&gt;</span></span>
</pre><p>&#x5E38;&#x89C4;&#x5B57;&#x7B26;&#x952E;&#x53CA;&#x529F;&#x80FD;&#x952E;&#x7684;&#x914D;&#x7F6E;</p>
<pre data-role="codeBlock" data-info="xml" class="language-xml">        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>btn</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>FA0101<span class="token punctuation">&quot;</span></span> <span class="token attr-name">text</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span><span class="token entity" title="&amp;">&amp;amp;</span><span class="token entity" title="&amp;">&amp;amp;</span><span class="token punctuation">&quot;</span></span> <span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>key_char</span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>a<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>btn</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>btn</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>FA0102<span class="token punctuation">&quot;</span></span> <span class="token attr-name">text</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>F3<span class="token punctuation">&quot;</span></span> <span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>key_func</span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>F3<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>btn</span><span class="token punctuation">&gt;</span></span>
</pre><p>PLC-IO&#x914D;&#x7F6E;</p>
<pre data-role="codeBlock" data-info="xml" class="language-xml">        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>btn</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>FA0202<span class="token punctuation">&quot;</span></span> <span class="token attr-name">text</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>PLC<span class="token punctuation">&quot;</span></span> <span class="token attr-name">image</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>./res/null.png<span class="token punctuation">&quot;</span></span> <span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>plc</span> <span class="token attr-name">input</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>2000.0<span class="token punctuation">&quot;</span></span> <span class="token attr-name">output</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>3000.0<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>btn</span><span class="token punctuation">&gt;</span></span>
</pre><p>&#x7279;&#x6B8A;&#x6309;&#x952E;&#x7684;&#x5904;&#x7406;&#x4EE5;&#x53CA;sticky&#x6548;&#x679C;</p>
<pre data-role="codeBlock" data-info="xml" class="language-xml">        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>btn</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>path-91<span class="token punctuation">&quot;</span></span> <span class="token attr-name">text</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span><span class="token entity" title="&amp;">&amp;amp;</span><span class="token entity" title="&amp;">&amp;amp;</span><span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>key_char</span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span><span class="token entity" title="&amp;">&amp;amp;</span><span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>btn</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>btn</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>path-93<span class="token punctuation">&quot;</span></span> <span class="token attr-name">text</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>:<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>key_char</span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>:<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>btn</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>btn</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>path-33<span class="token punctuation">&quot;</span></span> <span class="token attr-name">text</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span><span class="token entity" title="&quot;">&amp;quot;</span><span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>key_char</span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span><span class="token entity" title="&quot;">&amp;quot;</span><span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
...
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>btn</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>path-55<span class="token punctuation">&quot;</span></span> <span class="token attr-name">text</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>Ctrl<span class="token punctuation">&quot;</span></span> <span class="token attr-name">sticky</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>true<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>key_mode</span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>Ctrl<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>btn</span><span class="token punctuation">&gt;</span></span>
...
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>btn</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>path-59<span class="token punctuation">&quot;</span></span> <span class="token attr-name">text</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>Back<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>key_func</span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>backspace<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>btn</span><span class="token punctuation">&gt;</span></span>
...
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>btn</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>btn</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>plc0<span class="token punctuation">&quot;</span></span> <span class="token attr-name">image</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>./res/F4.png<span class="token punctuation">&quot;</span></span> <span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>key_func</span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>F4<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>btn</span><span class="token punctuation">&gt;</span></span>
</pre><p>sticky&#x663E;&#x793A;&#x6837;&#x5F0F;&#xFF1A;<br>
<img src="res/deep_sticky.png" alt=""></p>
<p>shell&#x811A;&#x672C;&#x7684;&#x8C03;&#x7528;</p>
<pre data-role="codeBlock" data-info="xml" class="language-xml">        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>btn</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>FA0201<span class="token punctuation">&quot;</span></span> <span class="token attr-name">text</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>shell<span class="token punctuation">&quot;</span></span> <span class="token attr-name">image</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>./res/left.png<span class="token punctuation">&quot;</span></span> <span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>shell</span> <span class="token attr-name">cmd</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>zenity --info --text <span class="token punctuation">&apos;</span>Hello, world!\n\t-- print by zenity<span class="token punctuation">&apos;</span><span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>btn</span><span class="token punctuation">&gt;</span></span>
</pre><p>&#x5B8F;&#x6309;&#x952E;&#x7684;&#x4F7F;&#x7528;</p>
<pre data-role="codeBlock" data-info="xml" class="language-xml">        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>btn</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>FA0203<span class="token punctuation">&quot;</span></span> <span class="token attr-name">text</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>Macro<span class="token punctuation">&quot;</span></span> <span class="token attr-name">image</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>./res/right.png<span class="token punctuation">&quot;</span></span> <span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>macro</span> <span class="token punctuation">&gt;</span></span><span class="token comment">&lt;!-- &#x5904;&#x7406;&#x5B8F;&#x4E8B;&#x4EF6; --&gt;</span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>key_mode</span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>Shift<span class="token punctuation">&quot;</span></span> <span class="token attr-name">index</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>0<span class="token punctuation">&quot;</span></span> <span class="token attr-name">isPressed</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>true<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>key_char</span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>2<span class="token punctuation">&quot;</span></span> <span class="token attr-name">index</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>1<span class="token punctuation">&quot;</span></span> <span class="token attr-name">isPressed</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>true<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>key_char</span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>2<span class="token punctuation">&quot;</span></span> <span class="token attr-name">index</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>2<span class="token punctuation">&quot;</span></span> <span class="token attr-name">isPressed</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>false<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>key_mode</span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>Shift<span class="token punctuation">&quot;</span></span>  <span class="token attr-name">index</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>3<span class="token punctuation">&quot;</span></span> <span class="token attr-name">isPressed</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>false<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>macro</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>btn</span><span class="token punctuation">&gt;</span></span>
</pre><h2 class="mume-header" id="85-%E8%B0%83%E6%95%B4qss%E6%A0%B7%E5%BC%8F%E8%A1%A8%E6%96%87%E4%BB%B6">8.5. &#x8C03;&#x6574;QSS&#x6837;&#x5F0F;&#x8868;&#x6587;&#x4EF6;</h2>

<p>&#x6837;&#x5F0F;&#x8868;&#x7684;&#x5185;&#x5BB9;&#x8F83;&#x4E3A;&#x5355;&#x4E00;&#xFF0C;&#x4E3B;&#x8981;&#x7528;&#x4E8E;&#x63A7;&#x5236;&#x975E;&#x56FE;&#x7247;&#x6309;&#x94AE;&#x7684;&#x663E;&#x793A;&#x6837;&#x5F0F;&#x3002;&#x4E00;&#x822C;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;&#x53EF;&#x4EE5;&#x53C2;&#x8003;&#x793A;&#x4F8B;&#x4EE3;&#x7801;&#xFF0C;&#x8C03;&#x6574;&#x76F8;&#x5173;&#x533A;&#x57DF;&#x5757;&#x7684;&#x5B57;&#x4F53;&#x3001;&#x5B57;&#x53F7;&#x4EE5;&#x53CA;&#x989C;&#x8272;RGB&#x5373;&#x53EF;&#x3002;</p>
<pre data-role="codeBlock" data-info="css" class="language-css"><span class="token selector">QFrame</span><span class="token punctuation">{</span>                                         <span class="token comment">/*&#x7A97;&#x53E3;&#x80CC;&#x666F;&#x8272;*/</span>
    <span class="token property">background-color</span><span class="token punctuation">:</span> <span class="token function">rgba</span><span class="token punctuation">(</span><span class="token number">60</span>,<span class="token number">67</span>,<span class="token number">77</span>,<span class="token number">255</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token selector">NonImgButton</span><span class="token punctuation">{</span>
    <span class="token property">background-color</span><span class="token punctuation">:</span> <span class="token function">rgb</span><span class="token punctuation">(</span><span class="token number">99</span>,<span class="token number">113</span>,<span class="token number">122</span><span class="token punctuation">)</span><span class="token punctuation">;</span>          <span class="token comment">/*&#x80CC;&#x666F;&#x8272;*/</span>
    <span class="token property">border-width</span><span class="token punctuation">:</span> <span class="token number">1</span>px<span class="token punctuation">;</span>                          <span class="token comment">/*&#x8FB9;&#x6846;&#x5BBD;&#x5EA6;&#x4E3A;1&#x50CF;&#x7D20;*/</span>
    <span class="token property">border-radius</span><span class="token punctuation">:</span> <span class="token number">5</span>px<span class="token punctuation">;</span>                         <span class="token comment">/*&#x8FB9;&#x6846;&#x5706;&#x89D2;&#x534A;&#x5F84;*/</span>
    <span class="token property">border-color</span><span class="token punctuation">:</span> <span class="token function">rgba</span><span class="token punctuation">(</span><span class="token number">255</span>, <span class="token number">225</span>, <span class="token number">255</span><span class="token punctuation">)</span><span class="token punctuation">;</span>          <span class="token comment">/*&#x8FB9;&#x6846;&#x989C;&#x8272;*/</span>
    <span class="token property">font</span><span class="token punctuation">:</span> <span class="token number">14</span>px <span class="token string">&quot;Helvetica&quot;</span><span class="token punctuation">;</span>                     <span class="token comment">/*&#x5B57;&#x4F53;*/</span>
        <span class="token property">color</span><span class="token punctuation">:</span> <span class="token function">rgb</span><span class="token punctuation">(</span><span class="token number">248</span>,<span class="token number">255</span>,<span class="token number">255</span><span class="token punctuation">)</span><span class="token punctuation">;</span>                <span class="token comment">/*&#x5B57;&#x4F53;&#x989C;&#x8272;*/</span>
<span class="token punctuation">}</span>

<span class="token selector">NonImgButton<span class="token pseudo-class">:hover</span></span><span class="token punctuation">{</span>                             <span class="token comment">/*&#x9F20;&#x6807;&#x60AC;&#x505C;&#x5728;&#x6309;&#x94AE;&#x4E0A;&#x65F6;*/</span>
<span class="token punctuation">}</span>

<span class="token selector">NonImgButton<span class="token pseudo-class">:pressed</span></span><span class="token punctuation">{</span>                           <span class="token comment">/*&#x6309;&#x94AE;&#x88AB;&#x6309;&#x4E0B;&#x65F6;*/</span>
    <span class="token property">background-color</span><span class="token punctuation">:</span> <span class="token function">rgb</span><span class="token punctuation">(</span><span class="token number">71</span>,<span class="token number">84</span>,<span class="token number">93</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token selector">NonImgButton<span class="token attribute">[sticky_status=&quot;sticky&quot;]</span></span><span class="token punctuation">{</span>           <span class="token comment">/*&#x6309;&#x94AE;&#x5904;&#x4E8E;&#x9ECF;&#x6EDE;&#x65F6;*/</span>
    <span class="token property">background-color</span><span class="token punctuation">:</span> <span class="token function">rgb</span><span class="token punctuation">(</span><span class="token number">215</span>,<span class="token number">186</span>,<span class="token number">125</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>

<span class="token selector">NonImgButton<span class="token attribute">[sticky_status=&quot;light_sticky&quot;]</span></span><span class="token punctuation">{</span>     <span class="token comment">/*&#x6309;&#x94AE;&#x5904;&#x4E8E;&#x8F7B;&#x9ECF;&#x6EDE;&#x65F6;*/</span>
    <span class="token property">background-color</span><span class="token punctuation">:</span> <span class="token function">rgb</span><span class="token punctuation">(</span><span class="token number">161</span>, <span class="token number">223</span>, <span class="token number">198</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</pre><p>&#x5229;&#x7528;QSS&#x63A7;&#x5236;&#x7684;&#x663E;&#x793A;&#x6837;&#x5F0F;&#xFF1A;<br>
<img src="res/light_sticky.png" alt=""></p>

      </div>
      
      
    
    
    
    
    
    
    
    
  
    </body></html>